package com.itdachang.design.behavioral.strategy;

/**
 * @author gcq
 * @Create 2022-02-13
 */
public class TeamGNR {

    private GameStrategy gameStrategy;

    public void setGameStrategy(GameStrategy gameStrategy) {
        this.gameStrategy = gameStrategy;
    }

    /**
     * 抽取游戏策略方法，并进行引用
     */
    public void startGame() {
        System.out.println("游戏开始....");

        // 游戏策略
        gameStrategy.warStrategy();

        System.out.println("游戏结束....");
    }
}